
import Head from 'next/head'

<Head>
  <script>
    {
      `(function() {
         var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?e60fb290e204e04c5cb6f79b0ac1e697";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
       })();`
    }
  </script>
</Head>

![LangChain](https://pica.zhimg.com/50/v2-56e8bbb52aa271012541c1fe1ceb11a2_r.gif)


DeepInfra[#](#deepinfra "Permalink to this headline")
=====================================================

本页面介绍如何在LangChain内使用DeepInfra生态系统。它分为两个部分：安装和设置，以及对特定DeepInfra包装器的引用。

安装和设置[#](#installation-and-setup "Permalink to this headline")
--------------------------------------------------------------

* 从[此处](https://deepinfra.com/)获取您的DeepInfra API密钥。

* 获取DeepInfra API密钥并将其设置为环境变量（`DEEPINFRA_API_TOKEN`)

包装器[#](#wrappers "Permalink to this headline")
----------------------------------------------

### LLM[#](#llm "Permalink to this headline")

存在DeepInfra LLM包装器，您可以使用它来访问

```python
from langchain.llms import DeepInfra

```

